package com.hotcode;

/**
 * @Author: huangzhigao
 * @Date: 2023/2/25 16:09
 */
public class leecode55 {
    public boolean canJump(int[] nums) {
        int max = 0;
        for (int i = 0; i < nums.length; i++) {
            if (i > max) {
                return false;
            }
            max = Math.max(max, i + nums[i]);
        }
        return true;
    }
}
